<input type="hidden" name="parse" value="0">
<script type="text/javascript" charset="utf-8" src="__STATIC__/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__STATIC__/umeditor/umeditor.min.js"></script>
<div id="editor"></div>
<script type="text/javascript">
	$('textarea[name="{$addons_data.name}"]').attr('id', 'editor_id_{$addons_data.name}');
	window.UEDITOR_HOME_URL = "__STATIC__/ueditor";
	window.UEDITOR_CONFIG.initialFrameHeight = parseInt('{$addons_config.editor_height}');
	window.UEDITOR_CONFIG.scaleEnabled = <eq name="addons_config.editor_resize_type" value="1">true<else />false</eq>;
	window.UEDITOR_CONFIG.imageUrl = '{:addons_url("Editor://Upload/ue_upimg")}';
	window.UEDITOR_CONFIG.imagePath = '';
	window.UEDITOR_CONFIG.imageFieldName = 'imgFile';
	UE.getEditor('editor_id_{$addons_data.name}');
</script>

<script type="text/javascript">
	var URL= "/addons/theme/vjiazu2/_static/js/ueditor/";
	var option = {
		initialFrameWidth: {$width},
		initialFrameHeight: {$height},
		minFrameHeight: 300,
		textarea: 'content'
	};

	var textarea = '{$contentName}';

	var ue = UM.getEditor('editor', {
		URL: "/addons/theme/vjiazu3/_static/js/ueditor/",
		imageUrl: UMEDITOR_CONFIG.UMEDITOR_HOME_URL + "../yunserver/yunImageUpForMini.php",
		imagePath: "http://",
		lang: /^zh/.test(navigator.language || navigator.browserLanguage || navigator.userLanguage) ? 'zh-cn' : 'en',
		langPath: UMEDITOR_CONFIG.UMEDITOR_HOME_URL + "lang/",
		focus: true,
		initialFrameWidth: {$width},
		initialFrameHeight: {$height},
		minFrameHeight: 300,
		textarea: (!textarea) ? 'content' : textarea,
	});


	// var editor = new UM.ui.Editor();
	// editor.render("{$contentName}");
</script>